//
//  Common.swift
//  01-SinaWeibo
//
//  Created by 周英培 on 16/5/20.
//  Copyright © 2016年 周英培. All rights reserved.
//

//import Foundation 把这一句改成下面这一句
import UIKit

//屏幕的宽和高
let ScreenWidth = UIScreen.mainScreen().bounds.width
let ScreenHeight = UIScreen.mainScreen().bounds.height

//用户登录授权配置信息
let client_id = "3911845017"
let client_secret = "86f9c31567b8a6523a0c3c2fe67d0fe7"
let redirect_uri = "http://www.baidu.com"

//根控制器的名称  注册通知的名称
let switchRootviewController = "switchRootviewController"
//插入表情的通知
let EmoticonBtnDidClickNotification = "EmoticonBtnDidClickNotification"

//设置随即色
func randomColor() -> UIColor {
    let red = CGFloat(random() % 256) / 255.0
    let blue = CGFloat(random() % 256) / 255.0
    let green = CGFloat(random() % 256) / 255.0
    
    return UIColor(red: red, green: green, blue: blue, alpha: 1)
}

//统一设置没有网络时的错误信息
let commonError = "没有网络"

//统一设置默认间距
let margin : CGFloat = 8

//时间格式化
let sharedDF = NSDateFormatter()